<?php
defined('_JEXEC') or die;

jimport('joomla.application.component.view');

class PhuongViewPhuong extends JView{
   protected $item;
   protected $form;

   function display($tmpl=NULL){

      $this->item = $this->get('Item');
      $this->form = $this->get('Form');

      $this->toolbar();

      parent::display($tmpl);
   }

   function toolbar(){
      if($this->item->id){
         JToolBarHelper::title('Edit');
      }else{
         JToolBarHelper::title('Add');
      }

      JToolBarHelper::apply('phuong.apply', 'JTOOLBAR_APPLY');
      JToolBarHelper::save('phuong.save', 'JTOOLBAR_SAVE');
      JToolBarHelper::save2new('phuong.save', 'JTOOLBAR_SAVE_AND_NEW');

      JToolBarHelper::divider();

      JToolBarHelper::cancel('phuong.cancel');
   }
}